commit - d71a84298a824064e37aa790ae24e3661952461f
commit + 5873447f6ec56e67e36008858448533b48715b96
blob - d68320aeca3b52d1e2559f4cfce57660d483639b
blob + 2117c54d49aae9a311c79217e7c297237e110bec
--- layouts/atom.atom
+++ layouts/atom.atom
<id>{{ .Permalink }}</id>
<link rel="alternate" type="text/html" href="{{ .Permalink }}" />
{{- with .OutputFormats.Get "atom" -}}
- {{ printf `<link rel="self" type=%q href=%q />` .MediaType.Type .Permalink | safeHTML }}
+ {{ printf `<link rel="self" type=%q href=%q />` .MediaType.Type .Permalink | safeHTML }}
{{- end }}
{{- with or (.GetTerms "authors") .Site.Params.author }}
- {{- if ne (printf "%T" .) "string" }}{{.Store.Set "schema" "Person"}}{{ end }}
- {{- with partial "schema/load" . }}
- <author>
- <name>{{ .name }}</name>
- {{- with .email }}
- <email>{{ . }}</email>
+ {{- with partial "schema/load" (dict "page" . "schema" "Person") }}
+ <author>
+ <name>{{ .name }}</name>
+ {{- with .email }}
+ <email>{{ . }}</email>
+ {{- end }}
+ </author>
{{- end }}
- </author>
{{- end }}
- {{- end }}
{{- with .Site.Params }}
- {{- if .icon }}
- <icon>{{ .icon | absURL }}</icon>
+ {{- if .icon }}
+ <icon>{{ .icon | absURL }}</icon>
+ {{- end }}
+ {{- if .logo }}
+ <logo>{{ .logo | absURL }}</logo>
+ {{- end }}
+ {{- if .copyright }}
+ <rights>{{ .copyright }}</rights>
+ {{- end }}
{{- end }}
- {{- if .logo }}
- <logo>{{ .logo | absURL }}</logo>
- {{- end }}
- {{- if .copyright }}
- <rights>{{ .copyright }}</rights>
- {{- end }}
- {{- end }}
{{/* Добавить ссылку на generator - текущий шаблон */}}
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- range $pages }}
- {{- $pctx := . }}
- {{- if eq .Kind "page" }}
- <entry>
- <title type="html">{{ .Title }}</title>
- <link href="{{ .Permalink }}" />
- <id>{{ .Permalink }}</id>
- <published>{{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>
- <updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
- {{- with .GetTerms "authors" }}
- {{- range . }}
- {{ .Store.Set "schema" "Person" }}
- {{- with partial "schema/load" . }}
- <author>
- <name>{{ .name }}</name>
- {{- with .email }}
- <email>{{ . }}</email>
+ {{- $pctx := . }}
+ {{- if eq .Kind "page" }}
+ <entry>
+ <title type="html">{{ .Title }}</title>
+ <link href="{{ .Permalink }}" />
+ <id>{{ .Permalink }}</id>
+ <published>{{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>
+ <updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
+ {{- with .GetTerms "authors" }}
+ {{- range . }}
+ {{ .Store.Set "schema" "Person" }}
+ {{- with partial "schema/load" . }}
+ <author>
+ <name>{{ .name }}</name>
+ {{- with .email }}
+ <email>{{ . }}</email>
+ {{- end }}
+ </author>
{{- end }}
- </author>
{{- end }}
{{- end }}
+ <summary type="html">{{ .Summary | plainify | html }}</summary>
+ {{- if .Site.Params.useFullContentInFeed }}
+ <content type="html">{{ .Content | transform.XHTML | safeHTML }}</content>
+ {{- end }}
+ {{- range .Params.tags }}
+ <category term="{{ . }}" />
+ {{- end }}
+ </entry>
{{- end }}
- <summary type="html">{{ .Summary | plainify | html }}</summary>
- {{- if .Site.Params.useFullContentInFeed }}
- <content type="html">{{ .Content | transform.XHTML | safeHTML }}</content>
- {{- end }}
- {{- range .Params.tags }}
- <category term="{{ . }}" />
- {{- end }}
- </entry>
{{- end }}
- {{- end }}
</feed>